{% extends "base_generic.html" %}

{% block content %}
  <h1>作者列表</h1>
  {% if author_list %}
  <ul>
    {% for author in author_list %}
      <li>
        <a href="{{ author.get_absolute_url }}">{{ author }}</a> 
        ({% if author.date_of_birth %}{{ author.date_of_birth }}{% endif %} - 
        {% if author.date_of_death %}{{ author.date_of_death }}{% endif %})
      </li>
    {% endfor %}
  </ul>
  {% else %}
    <p>图书馆中没有作者。</p>
  {% endif %}
  
  {% if perms.catalog.can_mark_returned %}
    <p><a href="{% url 'author-create' %}" class="btn btn-primary">添加作者</a></p>
  {% endif %}
{% endblock %}
